package com.dp.mallchat.common.chat.service.strategy.mark;

import com.dp.mallchat.common.chat.domain.enums.MessageMarkTypeEnum;
import com.dp.mallchat.common.chat.domain.vo.req.ChatMessageMarkReq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Author: dupeng
 * @CreateTime: 2024-07-29  14:44
 * @Description: 点踩
 */
@Service
@Slf4j
public class NoLikeMarkHandler extends AbstractMarkHandler{


    @Override
    protected MessageMarkTypeEnum getMsgMarkType() {
        return MessageMarkTypeEnum.DISLIKE;
    }

    @Override
    public void doMark(Long uid, Long msgId) {
        super.doMark(uid, msgId);
        //同时取消点赞的动作
        MarkFactory.getStrategyOrNull(MessageMarkTypeEnum.LIKE.getType()).unMark(uid, msgId);
    }
}
